package copy.express.pojo.type;

import com.sun.tools.javac.tree.JCTree;

public interface Type {
    //Boolean节点
    enum Boolean implements Type{
        DEFAULT
    }
    //Equals节点
    enum EqualsType implements Type{
        DEFAULT
    }
    //字节码表达式
    enum ExpressStatement implements Type{
        DEFAULT
    }
    //整数类型
    enum IntNumberType implements Type{
        INT,LONG
    }
    //小数类型
    enum DoubleNumberType implements Type{
        DOUBLE,FLOAT
    }
    //字符串类型
    enum StringType implements Type{
        DEFAULT
    }
    //字段类型
    enum FieldType implements Type{
        DEFAULT,SELF
    }
    //运算符
    public enum SymbolEnum implements Type {
        PLUS("+",false,1, JCTree.Tag.PLUS),
        PLUSPLUS("++",true,1,null),//表示高精度运算BigDecimal
        SUB("--",false,1,JCTree.Tag.MINUS),
        SUBSUB("-",true,1,null),//表示高精度运算BigDecimal
        STAR("*",false,2,JCTree.Tag.MUL),
        STARSTAR("**",true,2,null),//表示高精度运算BigDecimal
        SLASH("/",false,2,JCTree.Tag.DIV),
        SLASHSLASH("//",true,2,null),//表示高精度运算BigDecimal
        LEFT("(",false,3,null),
        RIGHT(")",false,3,null),
        PERCENT("%",false,2,JCTree.Tag.MOD),
        AND("&&",false,-3,JCTree.Tag.AND),
        OR("||",false,-4,JCTree.Tag.OR),
        GT(">",false,-2,JCTree.Tag.GT),
        GE(">=",false,-2,JCTree.Tag.GE),
        LT("<",false,-2,JCTree.Tag.LT),
        LE("<=",false,-2,JCTree.Tag.LE),
        NE("!=",false,-2,JCTree.Tag.NE),
        EQ("==",false,-2,JCTree.Tag.EQ),
/*        AMP("&",false),
        BAR("|",false),
        CARET("^",false),

        LTLT("<<",false),
        GTGT(">>",false),
        GTGTGT(">>>",false),*/
        ;
        public String value;
        public boolean isBigDecimal;
        public int rate;
        public JCTree.Tag tag;
        SymbolEnum(String value, boolean isBigDecimal,int rate,JCTree.Tag tag) {
            this.value = value;
            this.isBigDecimal = isBigDecimal;
            this.rate = rate;
            this.tag = tag;
        }
    }
}
